Software development is increasingly becoming complex resulting in the possibility for errors requiring costly solutions to correct. Software testing plays an important role in helping to ensure high software quality and to minimize errors. There are different kinds of testing in a software development process. For example, there is functional testing, performance testing, load or stress testing, robustness testing and installation testing. Functional testing, for example, includes unit testing, integration (or interaction) testing and acceptance testing. Here the term “unit” refers to a technique of testing only individual portions of the software system and not the complete software system as a whole.
Unit testing plays an important role in a software life cycle. Unit tests are usually written before actual production code is developed. When the production code is implemented, the test code is available to verify that the production code is working properly. Later, when the production code is modified, unit tests can help guarantee that existing functionality will not be unintentionally changed. If software errors are found after the production code has been shipped and employed in a production environment, the errors can be reconstructed using a unit test to help to fix the software code.